package org.jeecg.modules.pos.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: pos_order_goods
 * @Author: jeecg-boot
 * @Date:   2023-04-13
 * @Version: V1.0
 */
@Data
@TableName("pos_order_goods")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="pos_order_goods对象", description="pos_order_goods")
public class PosOrderGoods implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**关联租户*/
	@Excel(name = "关联租户", width = 15)
    @ApiModelProperty(value = "关联租户")
    private String tenantId;
	/**关联酒店*/
	@Excel(name = "关联酒店", width = 15)
    @ApiModelProperty(value = "关联酒店")
    private String hotelId;
	/**会员id*/
	@Excel(name = "会员id", width = 15)
    @ApiModelProperty(value = "会员id")
    private String memberId;
	/**单据号*/
	@Excel(name = "单据号", width = 15)
    @ApiModelProperty(value = "单据号")
    private String code;
    /**单据号*/
    @Excel(name = "是否为预约单", width = 15)
    @ApiModelProperty(value = "是否还是预约单，预约开台后改为false")
    private Boolean isBooking;
    /**单据号*/
    @Excel(name = "预约单Code", width = 15)
    @ApiModelProperty(value = "预约单Code")
    private String bookingCode;
    /**桌台id*/
    @Excel(name = "桌台id", width = 15)
    @ApiModelProperty(value = "桌台id")
    private String posTableId;
	/**桌号/取餐号*/
	@Excel(name = "桌号/取餐号", width = 15)
    @ApiModelProperty(value = "桌号/取餐号")
    private String tableNo;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remarks;
	/**支付方式*/
	@Excel(name = "支付方式", width = 15)
    @ApiModelProperty(value = "支付方式")
    private String paymentMethod;
	/**支付金额*/
	@Excel(name = "支付金额", width = 15)
    @ApiModelProperty(value = "支付金额")
    private BigDecimal payMoney;
	/**pos类型*/
	@Excel(name = "pos类型", width = 15)
    @ApiModelProperty(value = "pos类型")
    private String posType;
	/**挂房账订单id*/
	@Excel(name = "挂房账订单id", width = 15)
    @ApiModelProperty(value = "挂房账订单id")
    private String toRoomFeeOrderId;
	/**应收金额*/
	@Excel(name = "应收金额", width = 15)
    @ApiModelProperty(value = "应收金额")
    private BigDecimal money;
	/**结账状态*/
	@Excel(name = "结账状态", width = 15)
    @ApiModelProperty(value = "结账状态，1支付，0未支付")
    private Integer status;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private BigDecimal couponMoney;
	/**消费金额*/
	@Excel(name = "消费金额", width = 15)
    @ApiModelProperty(value = "消费金额")
    private BigDecimal consumeMoney;
	/**结账时间*/
	@Excel(name = "结账时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "结账时间")
    private Date settleTime;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**支付信息*/
    @Excel(name = "支付信息", width = 15)
    @ApiModelProperty(value = "支付信息")
    private String payInfo;
    /**团队id*/
    @Excel(name = "联桌id", width = 15)
    @ApiModelProperty(value = "联桌id")
    private String teamId;

    /**联桌序号*/
    @TableField(exist = false)
    private Integer teamIndex;
    /**是主房*/
    @TableField(exist = false)
    private Boolean isMain;
	@TableField(exist = false)
	private List<PosOrderGoodsDetail> posOrderGoodsDetailList;
    @TableField(exist = false)
    private String posTypeName;
    /** 是挂单 */
    @TableField(exist = false)
    private Boolean isPending;
}
